URL
Type
property
Summary
The URL displayed by the browser.
Syntax
set the URL of <widget> to <pUrl>
get the URL of <widget>
Description
The URL is the URL of the content be displayed in the browser.
The URL must be a standards-compliant URL. In particular,
file:
URLs must be of the form file://absolute path
, and the
path should be URL-encoded.
See RFC 1738, section 2.2.
The URL reflects the currently displaying page in the browser, and will change when navigating to another page. Setting the htmlText will result in the URL being empty.
Setting the URL won't necessarily cause resources to be
reloaded unless URLs of the resources explicitly change. However,
you can force the browser widget to reload a page using
do \"location.reload()\" in widget \"browser\"
after setting the url.
Setting the URL to empty will clear the currently loaded page, resulting in a blank page being displayed and the URL and htmlText of the widget being empty.
Parameters
Name | Type | Description |
---|---|---|
pUrl | string | A string specifying a URL. |
Examples
-- Navigate to livecode.com by setting the url property,
-- keeping a copy of the previous URL
local tOldUrl
put the URL of widget "myBrowser" into tOldUrl
set the URL of widget "myBrowser" to "https://livecode.com"
Related
property: htmlText